package com.wanhelibs.custom_view.views;

import android.content.Context;
import android.view.ViewGroup;

import com.wanhe.base.model.disgn.Event;
import com.wanhe.base.model.disgn.ViewEvent;
import com.wanhe.viewconf.views.child.MealBookChildItemView;
import com.wanhe.viewconf.views.group.CoordinateViewGroup;
import com.wanhelibs.custom_view.interfaces.IPopupOp;

/**
 * File Name:PopupOpView.java<br/>
 * Package Name:com.wanhelibs.custom_view.views<br/>
 * Date:2017/7/14 13:42<br/>
 * author:chendeji<br/>
 * desc: <br/>
 * Copyright (c) 2017/7/14, 781571323@qq.com All Rights Reserved.
 *
 */
public class PopupOpView extends MealBookChildItemView implements IPopupOp{

    public PopupOpView(Context context) {
        super(context);
    }

    @Override
    public void cancel(Event event, ViewEvent.Coor coor) {
        /**
         * 需要获取到事件之后，需要将窗口隐藏掉
         * @author 陈德基 
         * @time 2017/7/14 13:59
         */

        ViewGroup group = (ViewGroup) getParent();
        if (group instanceof CoordinateViewGroup){
            CoordinateViewGroup viewGroup = (CoordinateViewGroup) group;
            viewGroup.dismiss();
        }


    }
    
}
